package com.winning.bi.jdbc.dao;

import java.sql.DatabaseMetaData;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Timestamp;
import java.time.Instant;
import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.UUID;

import javax.sql.DataSource;

import org.springframework.context.support.ClassPathXmlApplicationContext;

public class Test {

	public static void main(String[] args) throws SQLException {

		//Timestamp timestamp = new Timestamp(Instant.now().get);
		
		Timestamp timestamp = new Timestamp(System.currentTimeMillis());
		System.out.println(timestamp);
	ClassPathXmlApplicationContext ac = new ClassPathXmlApplicationContext("file:config/applicationContext.xml");
	Dao dao = (Dao) ac.getBean("daoTask");
	Map<String,Object> map = new HashMap<String ,Object>();
		map.put("jobname", "xxxxx");
	map.put("jobid",   UUID.randomUUID().toString());
		map.put("markversion", "sssssss");
	map.put("sourcetable", "value");
		map.put("targettable","ddd");
	map.put("cron", "ddd");
	map.put("queuename","xxx");
		map.put("updatetime",new Timestamp(System.currentTimeMillis()));
		dao.insertMap(map, "task_info");
		
	}
}
